import torch


def create_best_device():
    return torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')


def to_cpu(tensor):
    return tensor.detach().cpu()

